import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import Layout from '@/layout'

const routes = [
  {
    path: '/',
    name: 'Index',
    component: () => import('@/views/index'),
  },
  {
    path: '/largeScreen',
    component: Layout,
    redirect: 'partyBuilding',
    children: [{
        path: 'partyBuilding',
        name: 'PartyBuilding',
        component: () => import('@/views/largeScreen/partyBuilding'),
      },
      {
        path: 'volunteerService',
        name: 'VolunteerService',
        component: () => import('@/views/largeScreen/volunteerService'),
      },
      {
        path: 'shop',
        name: 'Shop',
        component: () => import('@/views/largeScreen/shop'),
      },
      {
        path: 'charityHome',
        name: 'CharityHome',
        component: () => import('@/views/largeScreen/charityHome'),
      }
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router